﻿USE [actuals]
GO
/****** Object:  Table [dbo].[TblTeamMembers]    Script Date: 10/01/2011 20:02:00 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TblTeamMembers](
	[TeamId] [int] NOT NULL,
	[EmployeeId] [int] NOT NULL,
	[NoOfHoursPerDay] [int] NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[TblTeam]    Script Date: 10/01/2011 20:02:00 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TblTeam](
	[TeamId] [int] NOT NULL,
	[TeamDescription] [nvarchar](max) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[TblTasks]    Script Date: 10/01/2011 20:02:00 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TblTasks](
	[ProjectId] [int] NOT NULL,
	[ReleaseId] [int] NOT NULL,
	[TaskId] [int] NOT NULL,
	[TaskType] [nvarchar](50) NOT NULL,
	[TaskShortName] [nvarchar](50) NOT NULL,
	[Description] [nvarchar](max) NOT NULL,
	[InitialEstimation] [int] NOT NULL,
	[CurrentEstimation] [int] NOT NULL,
	[Elapsed] [int] NOT NULL,
	[Remaining] [int] NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[TblRoles]    Script Date: 10/01/2011 20:02:00 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TblRoles](
	[RoleId] [int] NOT NULL,
	[RoleDescription] [nvarchar](50) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[TblRelease]    Script Date: 10/01/2011 20:02:00 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TblRelease](
	[ProjectId] [int] NOT NULL,
	[ReleaseId] [int] NOT NULL,
	[StartDate] [datetime] NOT NULL,
	[EndDate] [datetime] NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[TblPublicHolidays]    Script Date: 10/01/2011 20:02:00 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TblPublicHolidays](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[HolidayDate] [datetime] NOT NULL,
	[Description] [nvarchar](50) NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[TblProjectTasks]    Script Date: 10/01/2011 20:02:00 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TblProjectTasks](
	[ProjectId] [int] NOT NULL,
	[ReleaseId] [int] NOT NULL,
	[TaskId] [int] NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[TblProject]    Script Date: 10/01/2011 20:02:00 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TblProject](
	[ProjectId] [int] NOT NULL,
	[ProjectDescription] [nvarchar](max) NULL,
	[StartDate] [datetime] NULL,
	[EndDate] [datetime] NULL,
	[TeamID] [int] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[TblEmployeeLeaves]    Script Date: 10/01/2011 20:02:00 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TblEmployeeLeaves](
	[EmpId] [int] NOT NULL,
	[Leave] [datetime] NOT NULL,
	[LeaveType] [nchar](10) NOT NULL,
	[AM] [bit] NOT NULL,
	[PM] [bit] NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[TblEmployee]    Script Date: 10/01/2011 20:02:00 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TblEmployee](
	[Id] [int] NOT NULL,
	[FirstName] [nvarchar](50) NOT NULL,
	[LastName] [nvarchar](50) NOT NULL,
	[NickName] [nvarchar](50) NOT NULL,
	[DOB] [datetime] NULL,
	[RoleId] [int] NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[TblActuals]    Script Date: 10/01/2011 20:02:00 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TblActuals](
	[ProjectId] [int] NULL,
	[ReleaseId] [int] NULL,
	[EmployeeId] [int] NOT NULL,
	[TaskId] [int] NOT NULL,
	[Description] [nvarchar](max) NOT NULL,
	[ActualDate] [datetime] NOT NULL,
	[NoOfHours] [int] NOT NULL
) ON [PRIMARY]
GO
